#ifndef _MIXP_PROCESS_WORKER_H
#define _MIXP_PROCESS_WORKER_H

#include "mixedprocess.h"
#include "core/protocol/mixp_packet.h"
#include "module/mixp_module_manager.h"
#include "core/threadpool/mixp_threadpool.h"

typedef struct mixp_worker
{
    pid_t pid;
    pid_t ppid;
    struct gevent_base *evbase;
    struct gevent *ev;
    mixp_worker_info_t *info;
    mixp_thread_pool_t *pool;

    mixp_packet_t *req;
} mixp_worker_t;

#ifdef __cplusplus
extern "C"
{
#endif

    mixp_worker_t *mixp_worker_new(mixp_worker_info_t *);
    void mixp_worker_free(mixp_worker_t *);

    void mixp_worker_loop(mixp_worker_t *);

#ifdef __cplusplus
};
#endif
#endif